<?php

/*
 *
 *
 *
*/

require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
require_once 'Conexao.php';

class TesteBoloesPendentes extends PHPUnit_Extensions_SeleniumTestCase {

    protected function setUp() {

        $this->setBrowser("*firefox");
        $this->setBrowserUrl("http://localhost/");
    }

    protected function tearDown() {
       
    }
    
    public function logonAdmin(){
        $this->open("/bolao/pendentes");
        $this->type("email", "fabiofeliciano@di.ufpb.br");
        $this->type("senha", "123456");
        $this->click("submit");
        $this->waitForPageToLoad("30000");
    }

    public function testApostaComSucesso() {        

        $this->logonAdmin();       

        $this->click("link=Apostar");
        $this->waitForPageToLoad("30000");
        try {
            $this->verifyTextPresent($this->isTextPresent("Aposta"));
        } catch (PHPUnit_Framework_AssertionFailedError $e) {
            array_push($this->verificationErrors, $e->toString());
        }
    }
}
?>
